function get(url) {
  return fetch(url, {
    method: 'get',
  }).then(res => res.json())
}

async function start() {
  let files = await get('/all-files')
  let html = files.map(file => `<a href="/download/${file}">${file}</a><br>`)
  document.body.innerHTML = html.join('')
}

start()
